home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / ttga10.zip / HICOLOR.DOC < prev    next >
Text File  |  1992-05-19  |  18KB  |  652 lines

  1.  
  2.  
  3.               H C   S V G A
  4.  
  5.                Version 1.0b
  6.              January 2, 1992
  7.  
  8.        A Library for Tseng(tm) HiColor(tm) Graphics
  9.              and Turbo/Borland(tm) C
  10. Copyright 1990,1991,1992 Synergrafix Consulting.  All Rights Reserved
  11.  
  12.      HCSVGA is produced by:
  13.  
  14.            Steve Enns            Synergrafix Consulting 
  15.         2425 Haultain Ave.        - Custom Programming
  16.           Saskatoon, Sk.          - Graphical and Numerical Software
  17.           Canada S7J 1R2          - Hardware and Software Consultation
  18.  
  19.  
  20. ACKNOWLEDGEMENTS
  21.  
  22.      Thanks to all the contributors to the absolutely superb graphics
  23.      books:
  24.  
  25.     Graphics Gems    Academic Press, Edited by Andrew S. Glassner, 1990,
  26.             ISBN 0-12-286165-5
  27.  
  28.     Graphics Gems II  Academic Press, Edited by James Arvo, 1991,
  29.               ISBN 0-12-064480-0
  30.  
  31.      Thanks as well to some greatly inspirational and explicit code
  32.      by Michael Abrash in the November 1991 Doctor Dobbs Journal.
  33.  
  34.      Finally, great thanks to Daniel Lee Crocker and the Stone Soup
  35.      Group for numerous tremendous contributions to the public good
  36.      through PICLAB, and FRACTINT (the best program ever written) both
  37.      containing very enlightening Targa(tm) file code.
  38.  
  39.      Trademarks like GIF(tm) and PC(tm) are held by
  40.      their respective companies. 
  41.  
  42.  
  43. DISCLAIMER
  44.  
  45.      The HCSVGA library and associated files (the "package") is provided
  46.      without warranty of any kind.  The user of the HCSVGA package assumes
  47.      complete responsibility for any and all incidental or consequential
  48.      damages which may occur during normal or abnormal use of the
  49.      HCSVGA package.  Use the HCSVGA package at your own risk.
  50.  
  51.  
  52. LICENSE
  53.  
  54.      The entire HCSVGA package, including the HCSVGA library,
  55.      documentation, and sample files are Copyright 1990,1991,1992
  56.      Synergrafix Consulting.  All rights reserved.  The HCSVGA
  57.      package may be freely distributed to others by any means, as
  58.      long the following (three) conditions are met:
  59.  
  60.       1) HCSVGA is distributed in a "package" containing
  61.       all the files listed in the HCREAD.ME file.
  62.  
  63.       2) HCSVGA is not distributed as part of any other
  64.       product, except with specific written permission from
  65.       the authors.
  66.  
  67.       3) NO fee of any kind is charged for the HCSVGA
  68.       package or for the service of providing the package,
  69.       except Computer Bulletin Board Systems or Services,
  70.       which may distribute the HCSVGA package even though they
  71.       may charge a membership or service fee.
  72.  
  73.  
  74.      If you are seriously interested in the source code for this 
  75.      library, then write me a letter with your proposed uses for
  76.      the code, and I'll return a quote for the price.  (Probably
  77.      $50.00-$100.00 with no royalties.)
  78.  
  79.  
  80. REQUIREMENTS
  81.  
  82.       HCSVGA requires the following:
  83.  
  84.            -    PC(tm)/XT(tm)/AT(tm)/386(tm) computer
  85.            -    TSENG 4000 based Video Card equipped with
  86.             at least 1 Megabyte of display memory, and
  87.             a Sierra HiColor(tm) DAC chip
  88.            -    A compatible C compiler (currently 
  89.             probably only works with Borland(tm))
  90.     
  91.  
  92. EXAMPLES
  93.  
  94.      See the following files for exmaple code using the library:
  95.  
  96.  
  97.     - HCTGAV.C    View TGA(tm) files on your HiColor card.
  98.         - HCGIFV.C    View GIF(tm) files...
  99.         - HCMOUSE.C    Interactive mouse demo.
  100.         - HCART.C    Draw HiColor patterns.
  101.     - MAKEDEMO.BAT  Compile the demo programs.
  102.  
  103.  
  104. HISTORY
  105.  
  106.      - Version 1.0b Completed December 20 1991
  107.     Just a Beta version!  Lots more to be done...
  108.  
  109.  
  110. PROPOSED FUTURE ENHANCHMENTS
  111.  
  112.        I would like to hear from users of the library.  If no
  113.      one seems to be using the library, I won't release any
  114.      more versions.  I would appreciate bug reports, with
  115.      examples of failures, and suggestions for additions or
  116.      improvments to the library.  (I unfortunately cannot
  117.      promise that I will be able to reply to all enquiries or
  118.      comments, but I can promise that your comments will be
  119.      read and considered.  I can also definately NOT promise
  120.      to help with programming problems!)  Here are some ways
  121.      that I would like to improve the library:
  122.  
  123.      - I will probably make versions of the library for
  124.      Microsoft C 6.0 and Watcom 8.5. (especially if someone
  125.      pays me...)
  126.  
  127.      - I may combine this library with my SuperVGA library.
  128.  
  129.      - I would like samples of Targa(tm) files (or GIFs) which
  130.      do not display properly when loaded with the
  131.      HCTGAVIEW or HCGIFVIEW funtions.
  132.  
  133.      - Support for other graphics hardware.  Hopefully, we will
  134.      be able to support new hardware and graphics modes as they
  135.      are introduced.  I will try to support the ATI VGAWonder XL(tm)
  136.      if someone sends me some fairly explicit code demonstrating
  137.      how modes are set, and memory banks are switched.
  138.  
  139.      - Faster GIF(tm) and Targa(tm) decoding and encoding
  140.  
  141.      - Faster everything else.
  142.  
  143.      - More primitives, like antialiased lines, circles and so on.
  144.  
  145.      - Small pop-up menu to work with the mouse
  146.  
  147.      - Real Documentation!
  148.  
  149.  
  150.  
  151. FUNCTION SYNOPSES
  152.  
  153.  
  154.  - Graphics Macros/Defines
  155.  
  156.  
  157. #define HC_SVGALO    0    /* 640x350 */ /* Not all modes supported */
  158. #define HC_SVGAMED    1    /* 640x400 */ /* on all cards!!! */
  159. #define HC_SVGAHI    2    /* 640x480 */
  160. #define HC_SVGAHI2    3       /* 800x600 */
  161.  
  162. #define    XOR    0    /* BitBlt modes */
  163. #define OR    1
  164. #define COPY    2
  165.  
  166.  
  167. #define RGB256INT(r,g,b)    /* Make a HiColor color integer from
  168.                  Red, Green, Blue values (all in 0..255 range)*/
  169.  
  170. #define RGBINT(r,g,b)        /* Make a HiColor color integer from
  171.                  Red, Green, Blue values (all in 0..31 range)*/
  172.  
  173. #define INTRED(c)        /* Get Red component from HiColor color int */
  174. #define INTGREEN(c)             /*     Green */
  175. #define INTBLUE(c)        /*     Blue */
  176. #define INTRED256(c)        /*     Red (0..255) range */
  177. #define INTGREEN256(c)        /*     Green */
  178. #define INTBLUE256(c)              /*     Blue */
  179.  
  180.  
  181.  - Graphics Functions
  182.  
  183.  
  184. int hicolorDAC (void);
  185.  
  186.  
  187.     Check for existence of Sierra HiColor DAC hardware.
  188.  
  189.     Returns:    TRUE or FALSE
  190.  
  191.  
  192. int tseng4000 (void);
  193.  
  194.     Check for existence of TSENG 4000(tm) hardware.
  195.  
  196.     Returns:    TRUE or FALSE
  197.  
  198.  
  199. int hcsetmodetseng (int Mode);
  200.  
  201.     Set HiColor modes on TSENG 4000 HiColor hardware.  The MODE
  202.     is 0..3 and defined in HICOLOR.H  Not all modes are supported
  203.     on all cards.
  204.  
  205.     Returns:    TRUE or FALSE
  206.  
  207.  
  208. int hcmodesize(int picwidth,int picheight);
  209.  
  210.     Get a Mode number for the HCSETMODETSENG function above, given
  211.     the size of a picture that you would like to display.  This
  212.     function currently just finds the mininum screen height that will
  213.     accomadate a given picture size.
  214.  
  215.     Returns:    integer 0..3 corresponding to Mode number defined
  216.             in HICOLOR.H
  217.  
  218.  
  219. void hctextmode (void);
  220.  
  221.     Set the video to text mode (bios mode 3).
  222.  
  223.  
  224. void hcputpoint (WORD x, WORD y, WORD color);
  225.  
  226.     Put a single pixel at location (X,Y) on the HiColor mode
  227.     graphics screen.  color  is a integer 0..32767 made up
  228.     of three 5 bit numbers representing (red,green,blue).
  229.  
  230.     Use the RGBINT or RGB256INT macros to define a color
  231.     number from the red, green and blue components.
  232.     RGBINT defines a color integer given the red, green and
  233.     blue components as numbers from 0..31 (a "native" HiColor
  234.     15 bit color value.)  RGB256INT returns a color integer
  235.     given the red, green and blue components as numbers from
  236.     0..255 (a "true-color" 24bit color). INTRGB and INTRGB256
  237.     perform the reverse operation - they return the red, green
  238.     and blue color components given a 15 bit color integer.
  239.  
  240.  
  241. void hcputpointxor (WORD x, WORD y, WORD color);
  242.  
  243.     As above, except XOR the color with the existing color
  244.     at the (X,Y) location.
  245.  
  246.  
  247. void hcputpointrgb (WORD x, WORD y, WORD r, WORD g, WORD b);
  248.  
  249.     Place a single pixel, specifying location and red, green,
  250.     blue color components.
  251.  
  252.  
  253. WORD rgb265int (WORD r, WORD g, WORD b);
  254.  
  255.     Function corresponding to RGB256 macro.
  256.  
  257.     Returns:    Color integer.
  258.  
  259.  
  260. WORD rgbint (WORD r, WORD g, WORD b);
  261.  
  262.     Function corresponding to RGBINT macro.
  263.  
  264.     Returns:    Color integer
  265.  
  266.  
  267. void intrgb256 (WORD color, WORD *r, WORD *g, WORD *b);
  268.  
  269.     Function corresponding to INTRGB256.
  270.  
  271.  
  272. void intrgb (WORD color, WORD *r, WORD *g, WORD *b);
  273.  
  274.     Function corresponding to INTRGB.
  275.  
  276.  
  277. WORD hcgetpoint (WORD x, WORD y);
  278.  
  279.     Get the color value of a pixel at location (X,Y).
  280.  
  281.     Returns:    color integer, 0..32767
  282.  
  283.  
  284. void hcgetpointrgb (WORD x, WORD y, WORD *r, WORD *g, WORD *b);
  285.  
  286.     Get the red, green, blue color values of a pixel at
  287.     location (X,Y).
  288.  
  289.     Returns:    red, green, blue in range 0..31
  290.  
  291.  
  292. WORD hcgetmaxx (void);
  293.  
  294.     Return the maximum x coordinate for the current HiColor mode.
  295.  
  296. WORD hcgetmaxy (void);
  297.  
  298.     Return the minimum y coordinate for the current HiColor mode.
  299.  
  300.  
  301. void hchline (WORD x, WORD y, WORD x1, register WORD color);
  302.  
  303.     Plot a horizontal line from (X,Y) to (X1,Y) using "color."
  304.  
  305.  
  306. void hcvline (WORD x, WORD y, WORD y1, register WORD color);
  307.  
  308.     Plot a vertical line from (X,Y) to (X,Y1) using color.
  309.  
  310.  
  311. void hchlinexor (WORD x, WORD y, WORD x1, register WORD color);
  312.  
  313.     Plot a horizontal line from (X,Y) to (X1,Y), XORing
  314.     color with the existing color.
  315.  
  316.  
  317. void hcvlinexor (WORD x, WORD y, WORD y1, register WORD color);
  318.  
  319.     Plot a vertical line from (X,Y) to (X1,Y), XORing
  320.     color with the existing color.
  321.  
  322.  
  323. void hcrectangle (WORD x, WORD y, WORD x1, WORD y1, WORD color);
  324.  
  325.     Plot a rectangle from (X,Y) to (X1,Y1) using color.
  326.  
  327.  
  328. void hcrectanglexor (WORD x, WORD y, WORD x1, WORD y1, WORD color);
  329.  
  330.     Plot a rectangle from (X,Y) to (X1,Y1), XORing
  331.     color with the existing color.
  332.  
  333. void hcline(int a1, int b1, int a2, int b2, WORD lcolor);
  334.  
  335.     Plot a line from (X,Y) to (X1,Y1) in lcolor.
  336.  
  337.  
  338. void hclinexor(int a1, int b1, int a2, int b2, WORD lcolor);
  339.  
  340.     Plot a line from (X,Y) to (X1,Y1), XORing lcolor
  341.     with the existing color.
  342.  
  343.  
  344. void hccircle(WORD xc,WORD yc,WORD rad,WORD color);
  345.  
  346.     Plot a circle at (XC,YC) using radius rad and color.
  347.  
  348.  
  349. void hcfillcircle(WORD xc,WORD yc,WORD rad,WORD color);
  350.  
  351.     Plot a filled circle at (XC,YC) using radius rad and color.
  352.  
  353.  
  354. void hcbar (WORD x, WORD y, WORD x1, WORD y1, register WORD color);
  355.  
  356.     Plot a filled rectangle from (X,Y) to (X1,Y1).
  357.  
  358.  
  359. void hcclrscr (WORD color);
  360.  
  361.     Fill the entire screen with color.
  362.  
  363.  
  364. void hcputrow (WORD x, WORD y, register WORD w, register WORD *buf);
  365.  
  366.     Fill a row starting at (X,Y) of width w, using the colors
  367.     from lbuf.
  368.  
  369.  
  370. void hcputrowxor (WORD x, WORD y, register WORD w, register WORD *buf);
  371.  
  372.     Fill a row starting at (X,Y) of width w, XORing the colors
  373.     from lbuf with the existing colors.
  374.  
  375.  
  376. void hcputrowor (WORD x, WORD y, register WORD w, register WORD *buf);
  377.  
  378.     Fill a row starting at (X,Y) of width w, ORing the colors
  379.     from lbuf with the existing colors.
  380.  
  381.  
  382. void hcgetrow (WORD x, WORD y, register WORD w, register WORD *buf);
  383.  
  384.     Get a row starting at (X,Y) of width w, putting the colors
  385.     into lbuf.
  386.  
  387.  
  388. DWORD hcgetimagesize (register WORD left, register WORD top, register WORD right,register WORD bottom);
  389.  
  390.     Get the size in bytes required to "hcgetimage" an area of
  391.     the screen defined by (LEFT,TOP) to (RIGHT,BOTTOM).
  392.  
  393.     Returns:    unsigned long integer of the
  394.             size in bytes of the region.
  395.  
  396.  
  397. void hcgetimage (WORD left, WORD top, WORD right, WORD bottom, WORD *bitmap);
  398.  
  399.     Get the area of the screen from (LEFT,TOP) to (RIGHT,BOTTOM),
  400.     placing the colors into buffer bitmap.
  401.  
  402.  
  403. void hcputimage (WORD left, WORD top, WORD *bitmap, WORD drawtype);
  404.  
  405.     Put a bitmap onto the screen at position (LEFT,TOP), using
  406.     drawtype 0..2 (XOR, OR or COPY, as defined in HICOLOR.H).
  407.  
  408. void hcputchr (unsigned char ch, WORD xpos, WORD ypos, WORD fg, WORD background);
  409.  
  410.     Draw a single character ch at position (XPOS,YPOS) using foreground
  411.     color fg and background color BG.  The (XPOS,YPOS) position refers
  412.     to the top left of the character.  The characters are drawn using
  413.     the font from ROM.
  414.  
  415.  
  416. void hcputstr (char *str, WORD xpos, WORD ypos, WORD fg, WORD background);
  417.  
  418.     Draw a string onto the screen at position (XPOS,YPOS) using
  419.     foreground and background colors FG and BG.
  420.  
  421.  
  422. void hcfill(int x,int y,int ncolor);
  423.  
  424.     Flood fill a bounded area of the screen starting at (X,Y)
  425.     and using color ncolor.  All contiguous pixels that are the
  426.     same color as pixel (X,Y) will be filled with color ncolor.
  427.  
  428.  
  429. void hcpfill(int x,int y,int bordcol,WORD *pat,int pw,int ph);
  430.  
  431.     Flood fill a bounded area of the screen with a pattern
  432.     PAT, which is PW pixels wide and PH pixels high.  All
  433.     pixels not equal to bordcol will be filled with the pattern.
  434.     The pattern may be a simple array of integers, or may be
  435.     a bitmap captured from the screen, and converted using
  436.     HCIMAGETOPATTERN below.
  437.  
  438.  
  439. WORD *hcimagetopattern(WORD *bitmap,WORD *w,WORD *h);
  440.  
  441.     Convert a bitmap which was captured from the screen using
  442.     HCGETIMAGE into a pattern for use with HCPFILL.
  443.  
  444.     Returns:    WORD *pointer to a pattern, and the width
  445.             and height of the pattern.
  446.  
  447.  
  448.  - Mouse Macros/Defines
  449.  
  450.  
  451. #define GRCURSORSIZEX    11    /* Max. graphics cursor width in pixels */
  452. #define GRCURSORSIZEY    15    /* Max. cursor height in pixels + 1 */
  453. #define GRCURSORNUM    10    /* Max number of default and definable cursors */
  454.  
  455. #define ARROWCURSOR        0    /* Graphics cursor types */
  456. #define SMALLARROWCURSOR    1
  457. #define CROSSHAIR        2
  458. #define SMALLCROSSHAIR        3
  459. #define DIAGCROSSHAIR        4
  460.  
  461. typedef int    grcursortype[GRCURSORSIZEX][GRCURSORSIZEY];
  462. typedef char    mousestr[80];
  463.  
  464.  
  465.  - Mouse functions
  466.  
  467. int  initmouse(void);                /* Init. mouse driver */
  468.  
  469.     Low-level mouse initialization routine.  Checks for
  470.     mouse driver, initializes.
  471.  
  472.     Returns:    TRUE for success.
  473.  
  474.  
  475. void showmouse(void);                /* Show (text) cursor */
  476.  
  477.     Show cursor (text mode only).
  478.  
  479.  
  480. void hidemouse(void);                /* Unshow (text) cursor */
  481.  
  482.     Hide cursor (text mode only).
  483.  
  484.  
  485. void getmouse(int *x,int *y,int *buttons);/* Get position */
  486.  
  487.     Get current mouse position (X,Y) and button state (BUTTONS).
  488.  
  489.  
  490. void putmouse(int x,int y);            /* Place mouse */
  491.  
  492.     Set mouse position to (X,Y).
  493.  
  494.  
  495. void getmousebuttonon(int button,int *buttonstate,
  496.               int *numpresses,int *x,int *y);/* Get buttons pressed */
  497.  
  498.     Get mouse button press state. Returns number of presses, (X,Y)
  499.     location.
  500.  
  501.  
  502. void getmousebuttonoff(int button,int *buttonstate,
  503.                int *numreleases,int  *x,int *y);/* Get buttons released */
  504.  
  505.     Get mouse button release state. Returns number of releases, (X,Y)
  506.     location.
  507.  
  508.  
  509. void setmouserange(int x,int y,int x1,int y1);    /* Set range */
  510.  
  511.     Restrict the movement of the mouse to the rectangle defined
  512.     by (X,Y) of (X1,Y1).
  513.  
  514.  
  515. void getmousemotion(int *x,int *y);        /* Get movement */
  516.  
  517.     Return mouse movement in (X,Y).
  518.  
  519.  
  520. void setmousemove(int x,int y);            /* Set sensitivity */
  521.  
  522.     Set mouse sensitivity to (X,Y).
  523.  
  524.  
  525. void setgrcursor(int index,grcursortype newgrcursor);/* Set cursor bitmap */
  526.  
  527.     Set the type of graphics cursor to be used to index.
  528.     Predefined cursors are defined as 0..4 in HICOLOR.H.
  529.  
  530.  
  531. void putgrcursor(int x,int y);        /* Place graphics cursor */
  532.  
  533.     Put the graphics cursor at location (X,Y).
  534.  
  535.  
  536. void unputgrcursor(void);        /* Remove graphics cursor */
  537.  
  538.     Remove the previous placed graphics cursor.
  539.  
  540.  
  541. int getgrcursorx(void);                 /* Get current postn */
  542.  
  543.     Get current horizontal graphics cursor position.
  544.  
  545.     Returns:    Current X position.
  546.  
  547.  
  548. int getgrcursory(void);
  549.  
  550.     Get current vertical graphics cursor position.
  551.  
  552.     Returns:    Current Y position.
  553.  
  554.  
  555. int initgrcursor(int grcursorindex,int color);/* Init. graphics cursor */
  556.  
  557.     Initialize the graphics cursor to grcursorindex and color,
  558.     where grcursorindex is the cursor type to use.
  559.  
  560.  
  561. void closegrcursor(void);
  562.  
  563.     Remove, deinitialize the graphics cursor.
  564.  
  565.  
  566.  - TARGA(tm) Macros/Defines
  567.  
  568.  
  569. #define HCTGACANTOPEN    -1
  570. #define HCTGANOMEM    -2
  571. #define HCTGANOTSUPPORTED -3
  572. #define HCTGACANTREAD    -4
  573. #define HCTGACANTWRITE    -5
  574.  
  575. #define MAXTGAXWIDTH    1280
  576. #define MAXTCOMMENT    256
  577.  
  578. extern unsigned char tcomment[MAXTCOMMENT];
  579. extern unsigned char tcommentsize;
  580.  
  581.  
  582.  - TARGA(tm) Functions
  583.  
  584.  
  585. int hctgasize(char *fname,int *w,int *h,unsigned char *csize,unsigned char *comm);
  586.  
  587.     Get the size of a Targa(tm) file FNAME.
  588.  
  589.     Returns:    Width W and Height H, and the size
  590.             of the comment COMM, in bytes, CSIZE.
  591.  
  592.  
  593. int hctgaview(char *fname,int x,int y,int x1,int y1,int dither);
  594.  
  595.     Display the Targa(tm) file FNAME in the rectangle defined by
  596.     (X,Y) and (X1,Y1).  If DITHER is TRUE, then dither 24
  597.     or 32 bit images while displaying.
  598.  
  599.     Returns:    0 for success or an error code as
  600.             defined in HCTARGA.H
  601.  
  602.  
  603. int hctgasave(char *fname,int x,int y,int x1,int y1,int compressed,unsigned char csize,unsigned char *comm);
  604.  
  605.     Save the rectangular region of the screen defined by (X,Y)
  606.     and (X1,Y1) to a Targa-16(tm) file FNAME.  Save as a compressed
  607.     file if COMPRESSED is TRUE, use a comment of length CSIZE (up to
  608.     255 characters) from COMM.  If X is -1 then the width of the image
  609.         will be centered on the screen, and if Y is -1 then the height of
  610.         image will be centered on the screen.  If X1 is not -1 then the
  611.     entire width of the image will be displayed, and similarily for
  612.     the height (otherwise the image will be clipped to (X1,Y1).
  613.  
  614.     Returns:    0 for success or an error code as defined in
  615.             HCTARGA.H
  616.  
  617.  
  618.  
  619.  - GIF(tm) Macros/Defines
  620.  
  621.  
  622. #define HCGIFCANTOPEN    -1
  623. #define HCGIFNOMEM    -2
  624. #define HCGIFBADGIF    -3
  625. #define HCGIFNOTGIF    -4
  626.  
  627.  
  628.  - GIF(tm) Functions
  629.  
  630.  
  631. int hcgifsize(char *filename,int *width,int *height,long offset);
  632.  
  633.     Get the size of a GIF(tm) file FNAME, reading FNAME starting
  634.     at position OFFSET.
  635.  
  636.     Returns:    Width W and Height H, and the size
  637.             of the comment COMM, in bytes, CSIZE.
  638.  
  639.  
  640. int hcgifview(char *filename,int xs,int ys,long offset,int autoscale);
  641.  
  642.     Display the GIF(tm) file FNAME starting at position (XS,YS),
  643.     reading FNAME starting at position OFFSET.  If AUTOSCALE is
  644.     TRUE, then sky the image up to try to fill the available area.
  645.     If XS is -1 then the width of the image will be centered on the
  646.     screen, and if YS is -1 then the height of image will be centered
  647.     on the screen. 
  648.  
  649.     Returns:    0 for success or an error code as
  650.             defined in HCTARGA.H
  651.  
  652.